//
//  File.swift
//  
//
//  Created by didi on 2022/9/21.
//

import Foundation

public struct SelectGroupFieldContext {
    public let key: String
    public var label: LabelContext
    public var options: [OptionGroupContext]
    public var value: String?
    public var error: String?

    public init(key: String,
                label: LabelContext? = nil,
                options: [OptionGroupContext] = [],
                value: String? = nil,
                error: String? = nil) {
        self.key = key
        self.label = label ?? .init(key: key)
        self.options = options
        self.value = value
        self.error = error
    }
}
